﻿<MRow Justify="@JustifyTypes.Center">
    <MDatePicker Class="mt-4"
                 AllowedDates="_allowedMonths"
                 @bind-Value="_date"
                 Type="DatePickerType.Month"
                 Min="_min"
                 Max="_max"></MDatePicker>
</MRow>

@code {
    private DateOnly _date = DateOnly.Parse("2017-12");
    private DateOnly _min = DateOnly.Parse("2017-06");
    private DateOnly _max = DateOnly.Parse("2019-10");
    private Func<DateOnly, bool> _allowedMonths = value => value.Month % 2 == 0;
}